<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
    <meta charset="UTF-8">
    <title>点单记录列表</title>
    <meta name="page-view-size" content="1280*720">
    <link rel="stylesheet" href="../css/base.css">
    <script type="text/javascript" src="../lib/js/evm.js"></script>
    <script type="text/javascript" src="../lib/js/Evm_djyw.js"></script>
    <script type="text/javascript" src="../lib/js/key.js"></script>
    <script src="../lib/js/jquery-1.11.1.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="../lib/js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/api.js" type="text/javascript" charset="utf-8"></script>
    <script src="../js/public.js" type="text/javascript" charset="utf-8"></script>
    <style>
        .theoretical-bg {
	width: 1280px;
	height: 720px;
	background: url(../images/bg.png) no-repeat left top;
}
.list-bg {
    width: 1120px;
    height: 470px;
    background-color: rgba(39,79,193,.1);
    position: relative;
    top: 152px;
    left: 80px;
}


.list-con {
    height: 409px;
    box-sizing: border-box;
    /* border: 1px solid red; */
    overflow: hidden;
}

.list-bottom {
    width: 100%;
    height: 60px;
    float: left;
    box-sizing: border-box;
    /* border: 1px solid red; */
    overflow: hidden;
}

.page-show {
    width: 126px;
    height: 34px;
    border: 2px solid rgba(255, 255, 255, 1);
    border-radius: 10px;
    color: #fff;
    font-size: 24px;
    text-align: center;
    line-height: 34px;
    /* margin-top: 15px;
    margin-left: 50%; */
    transform: translateX(-50%);
    float: left;
}

.my-help {
    width: 127px;
    height: 34px;
    background: rgba(255, 216, 0, 1);
    border-radius: 10px;
    float: right;
    margin-top: 7px;
    font-size: 22px;
    color: #fff;
    font-weight: bold;
    line-height: 34px;
    text-align: center;
    border: 3px solid transparent;
}

.list-row {
    width: 100%;
    height: 58px;
    box-sizing: border-box;
    padding: 0px 20px;
    float: left;
    overflow: hidden;
    text-align: center;
    color: #333333;
    font-size: 28px;
    line-height: 58px;
    margin-bottom: 10px;
    border-bottom: 1px dashed white;
}

.list-row>div {
    height: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.list-row.active {
    color: #ffffff;
    background: #FF861F;
    border-radius: 10px;
}
.state{
    width: 100px;
    height: 34px !important;
    /* background: rgba(228,194,3,1); */
    border-radius: 8px;
    font-size: 22px;
    margin-top: 10px;
    line-height: 35px;
    float: left;
    color: #FFFFFF;
}
.list-name{
    /* border: 1px solid; */
    float: left;
    margin-left: 170px;
}
.list-phone{
    float: left;
    margin-left: 180px;
}
.list-time{
    float: right;
    margin-left: 60px;
}
.list-address{
    float: right;
}
.noneData {
            font-size: 55px;
            color: #fff;
            text-align: center;
            line-height: 300px;
            letter-spacing: 10px;
        }
/* .list-title{
    float: left;
    max-width: 75%
}
.list-time{
    float: right
} */
    </style>
</head>

<body>
    <div class="theoretical-bg" id="helpMain">
        <div class="list-bg">
            <div class="list-con" id="list-con">
            </div>
            <div class="list-bottom">
                <div class="page-show" id="page_show">
                    <span id="now_page">0</span>
                    /
                    <span id="total_page">0</span>
                </div>
            </div>
        </div>
    </div>

</body>
<script>
    var modelIndex = {
        // disUser: true,
        index: 0,//初始位置
        pageSize: 7,
        type: 1,
        listName: 'list-row', //模块名称
        containerId: 'list-con',//包含模块的标签id
        
    }
    TV.structure('芝麻一点通')
    
    function getMessage(page, pageSize, pos, index) {
        var param = {
            page: page,
            pagesize: pageSize,
            id:TV.GetParam('id'),
            // area_id: $.cookie('TV_CST_AREA'),
            device:'tv'
        }
        GetDatas('assistLogList', param, function (err, res) {
            var mess = res.data;
            var str = '';
            if (mess.items.length > 0) {
                for (var i = 0; i < mess.items.length; i++) {
                    str += "<div class='list-row' data-id=" + mess.items[i].id + ">";
                    //通过数组的方式 将所有的对应项都输出来
                    var status = mess.items[i].status
                    if(status == 0){
                        str += "<div class='state' style='background:#E4C203'>求助中</div>"
                    }else if(status == 1){
                        str += "<div class='state' style='background:#00E54A'>帮助中</div>"
                    }else if(status == 2){
                        str += "<div class='state' style='background:#F76801'>已完成</div>"
                    }else(
                        str += "<div class='state' style='background:#747474'>已结单</div>"
                    )
                    
                    str += "<div class='list-name'>" + mess.items[i].username + "</div>"
                    str += "<div class='list-phone'>" + mess.items[i].mobile + "</div>"
                    str += "<div class='list-time'>" + mess.items[i].format_add_time + "</div>"
                    // str += "<div class='list-address'>" + mess.items[i].address + "</div>"
                    // str += "<div class='list-title'>" + mess.items[i].title + "</div>";
                    // str += "<div class='list-time'>" + mess.items[i].add_time + "</div>";
                    str += "</div>"
                }
            }else{
                str += '<div class="noneData">暂无数据</div>';
                $('#page_show').css('display', 'none');
            }
            $('#list-con').html(str);
            $('#now_page').html(page)
            $('#total_page').html(mess.totalpage)
            right.index = index ? index : pos == 'previous' ? pageSize - 1 : 0;
            right.initialization();
            right.toggleFocus(right.index);


        })
        // right.toggleFocus();
    }



    function direEnter(index) {
        
        // window.location.href = 'detailPage.html?id='+$('.active').attr('data-id');

    }
</script>
<script type="text/javascript" src="../js/pageList.js"></script>

</html>